home *** CD-ROM | disk | FTP | other *** search
- ; IBML Sample program #7.
- ; A comparison of register-register
- ; moves with register-memory moves
-
- #data
- i word ?
- j word ?
- k word ?
- l word ?
- #enddata
-
- #repetitions 300000
- #unravel 128
-
- ; The following check checks to see how
- ; long it takes to multiply two values
- ; using the IMUL instruction.
-
- #code ("Register-Register moves, no Hazards")
- %do
- mov bx, ax
- mov cx, ax
- mov dx, ax
- mov si, ax
- mov di, ax
- mov bp, ax
- #endcode
-
- #code ("Register-Register moves, with Hazards")
- %do
- mov bx, ax
- mov cx, bx
- mov dx, cx
- mov si, dx
- mov di, si
- mov bp, di
- #endcode
-
- #code ("Memory-Register moves, no Hazards")
- %do
- mov ax, i
- mov bx, j
- mov cx, k
- mov dx, l
- mov ax, i
- mov bx, j
- #endcode
-
- #code ("Register-Memory moves, no Hazards")
- %do
- mov i, ax
- mov j, bx
- mov k, cx
- mov l, dx
- mov i, ax
- mov j, bx
- #endcode
-
-
-
- #end
-